/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-09-29
*/
package com.rzico.order.service;

import com.rzico.base.BaseMapper;
import com.rzico.base.impl.BaseServiceImpl;
import com.rzico.exception.CustomException;
import com.rzico.order.entity.BargainOrder;
import com.rzico.order.entity.BargainPeriod;
import com.rzico.order.mapper.BargainPeriodMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzico.order.mapper.BargainOrderMapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <pre>
 * 砍价订单业务类
 * </pre>
 *
 * @author Rzico Boot
 * @version 1.0
 */
@Service
public class BargainOrderService extends BaseServiceImpl<BargainOrder, String> {

    @Autowired
    private BargainOrderMapper bargainOrderMapper;

    @Autowired
    private BargainPeriodMapper bargainPeriodMapper;

    @Override
    public BaseMapper<BargainOrder, String> getMapper() {
        return bargainOrderMapper;
    }

    public List<BargainOrder> getItemList(Long periodId) {

        Map<String,Object> params = new HashMap<>();
        params.put("periodId",periodId);
        return bargainOrderMapper.selectList(params);

    }


    public List<BargainOrder> getOrderList(Long periodId) {

        Map<String,Object> params = new HashMap<>();
        params.put("periodId",periodId);
        return bargainOrderMapper.selectList(params);

    }



}
